home *** CD-ROM | disk | FTP | other *** search
- #
- # Sample links dictionary file for Seth Golub's txt2html v1.11
- # http://www.cs.wustl.edu/~seth/txt2html/
- #
- # $Revision: $
- #
- # This dictionary contains some patterns for converting obvious URLs,
- # ftp sites, hostnames, email addresses and the like to hrefs.
- #
- # Adapted shamelessly from the html.pl package by Oscar Nierstrasz in
- # the Software Archive of the Software Composition Group
- # http://iamwww.unibe.ch/~scg/Src/
- #
- # Email suggestions to seth@cs.wustl.edu
- # Please include "txt2html" in the subject of your message.
- #
-
- # Urls: <serice>:<rest-of-url>
-
- |snews:[\w\.]+| -> $&
- |http:[\w/\.:+\-~\%#?]+| -> $&
- |shttp:[\w/\.:+\-~\%#?]+| -> $&
- |https:[\w/\.:+\-~\%#?]+| -> $&
- |file:[\w/\.:+\-]+| -> $&
- |ftp:[\w/\.:+\-]+| -> $&
- |wais:[\w/\.:+\-]+| -> $&
- |gopher:[\w/\.:+\-]+| -> $&
- |telnet:[\w/\.:+\-]+| -> $&
-
-
- # catch some newsgroups to avoid confusion with sites:
- |([^\w\-/\.:\@>])(alt\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(bionet\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(bit\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(comp\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(gnu\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(misc\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(news\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(rec\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(soc\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(talk\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
- |([^\w\-/\.:\@>])(ch\.[\w\.+\-]+[\w+\-]+)| -h-> $1<a href="news:$2">$2</a>
-
- # FTP locations (with directory):
- # anonymous@<site>:<path>
- |(anonymous\@)([a-zA-Z][\w\.+\-]+\.[a-zA-Z]{2,}):(\s*)([\w\d+\-/\.]+)|
- -h-> $1<a href="ftp://$2/$4">$2:$4</a>$3
-
- # ftp@<site>:<path>
- |(ftp\@)([a-zA-Z][\w\.+\-]+\.[a-zA-Z]{2,}):(\s*)([\w\d+\-/\.]+)|
- -h-> $1<a href="ftp://$2/$4">$2:$4</a>$3
-
- # Email address
- |[a-zA-Z0-9_\+\-\.]+\@([a-zA-Z][\w\.+\-]+\.[a-zA-Z]{2,})|
- -> mailto:$&
-
- # <site>:<path>
- |([^\w\-/\.:\@>])([a-zA-Z][\w\.+\-]+\.[a-zA-Z]{2,}):(\s*)([\w\d+\-/\.]+)|
- -h-> $1<a href="ftp://$2/$4">$2:$4</a>$3
-
- # NB: don't confuse an http server with a port number for
- # an FTP location!
- # internet number version: <internet-num>:<path>
- |([^\w\-/\.:\@])(\d{2,}\.\d{2,}\.\d+\.\d+):([\w\d+\-/\.]+)|
- -h-> $1<a href="ftp://$2/$3">$2:$3</a>
-
- # telnet <site> <port>
- |telnet ([a-zA-Z][\w+\-]+(\.[\w\.+\-]+)+\.[a-zA-Z]{2,})\s+(\d{2,4})|
- -h-> telnet <a href="telnet://$1:$3/">$1 $3</a>
-
- # ftp <site>
- |ftp ([a-zA-Z][\w+\-]+(\.[\w\.+\-]+)+\.[a-zA-Z]{2,})|
- -h-> ftp <a href="ftp://$1/">$1</a>
-
- # host with "ftp" in the machine name
- |([a-zA-Z][\w+\-]*ftp[a-zA-Z][\w+\-]*\.[\w\.+\-]+\.[a-zA-Z]{2,})([^\w\d\-/\.:!])|
- -h-> ftp <a href="ftp://$1/">$1</a>$2
-
- # <site> <port>
- |([a-zA-Z][\w+\-]+\.[\w+\-]+\.[a-zA-Z]{2,})\s+(\d{2,4})|
- -h-> <a href="telnet://$1:$2/">$1 $2</a>
-
- # just the site name: <site>
- |([^\w\-/\.:\@>])([a-zA-Z][\w+\-]+(\.[\w+\-]+)+\.[a-zA-Z]{2,})|
- -h-> $1<a href="telnet://$2">$2</a>
-
- # just internet numbers with port:
- |([^\w\-/\.:\@])(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s+(\d{1,4})|
- -h-> $1<a href="telnet://$2:$3">$2 $3</a>
-
- # just internet numbers:
- |([^\w\-/\.:\@])(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|
- -h-> $1<a href="telnet://$2">$2</a>
-
-
- # RFCs
- /RFC ?(\d+)/ -i-> http://www.cis.ohio-state.edu:82/rfc/rfc$1.html
-
-
- # Seth and his amazing conversion program :-)
-
- "Seth Golub" -i-> http://www.cs.wustl.edu/~seth/
- "txt2html" -i-> http://www.cs.wustl.edu/~seth/txt2html/
-
-
- # End of sample dictionary
-
-